package com.github.pudding.mq;

import org.apache.rocketmq.spring.starter.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.starter.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author Stephen
 * @since 2018/9/6
 */
@Service
@RocketMQMessageListener(consumerGroup = "demo_consumer", topic = "test_topic", consumeThreadMax = 1)
public class DemoConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        System.out.println("message == " + message);
    }
}
